//
//  SubmittedView.swift
//  IDF
//
//  Created by 陈徐挺 on 30/03/2018.
//  Copyright © 2018 Jesse.chen. All rights reserved.
//

import UIKit
import Reusable
import SwiftyTimer

class SubmittedView: UIView, NibOwnerLoadable {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.loadNibContent()
       
        
    }
    @IBAction func doneClick(_ sender: UIButton) {
        nowNavgationController.popToRootViewController(animated: true)
        Timer.after(0.1) {
            mainTabBarController.selectedIndex = 1
            nowNavgationController = mainTabBarController.viewControllers![1] as! UINavigationController
        }
        removeFromSuperview()
    }
    
}
